package top.laoshuzi.designpatterns.base.created.singleton.kotlin

/**
 * 静态内部类
 */
class Singleton4 {

    companion object {

        fun getInstance(): Singleton4 = SingletonInstance.INSTANCE

        private object SingletonInstance {
            val INSTANCE = Singleton4()
        }
    }

    private var name: String = "静态内部类"

    fun getName(): String = name

}
